package com.wtcrazy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;


@Data
@TableName(value = "posts")
public class Post {
    private String id;
    private int viewCount;
    private int likeCount;//注意和数据库对应类型,否则有null
    private int commentCount;
    private long publishDate;
    private String title;
    private String content;
    private String description;
    private Object picsUrl;
    private String province;
    private String publishIp;
    @TableId(value = "uid", type = IdType.AUTO)//下划线会自动转驼峰
    private String uid;
    private User user;//帖子表的作者【涉及联表查询】
}
